<template>
  <div class="goodsdesc-con">
    <h4>图文介绍</h4>
    <hr />
    <h4 class="tit">{{info.title}}</h4>
    <hr />
    <div class="content" v-html="info.content"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      info: []
    };
  },
  props: ["id"],
  created() {
    this.getGoodsDesc();
  },
  methods: {
    async getGoodsDesc() {
      const { data } = await this.$http.get("/api/goods/getdesc/" + this.id);
      if (data.status === 0) {
        //console.log(data);
        return (this.info = data.message[0]);
      }
    }
  }
};
</script>

<style lang="scss" scoped>
.goodsdesc-con {
  .tit {
    font-size: 16px;
    margin: 10px 0;
    text-align: center;
    color: blue;
  }
  .content {
    img {
      width: 100%;
      //height: 100%;
      // margin: 0;
      //padding: 0;
      //padding-top:-15px ;
      //border: none;
    }
    table{
      width: 100%;
      img{
        width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
      }
    }
  }
}
</style>